package be.novelfaces.showcase.webdriver.pages.numpaddecsep;

import be.novelfaces.showcase.webdriver.pages.NovelFacesPage;
import be.novelfaces.showcase.webdriver.util.NFBy;
import be.novelfaces.webdriver.component.primefaces.AccordionPanel;
import be.novelfaces.webdriver.component.primefaces.Tab;

public class NumpadDecSepPage extends NovelFacesPage<NumpadDecSepPage> {

	public static final String EXAMPLE1 = "example1";
	public static final String EXAMPLE2 = "example2";
	public static final String EXAMPLE3 = "example3";
	public static final String EXAMPLE4 = "example4";
	public static final String EXAMPLE5 = "example5";

	private AccordionPanel accordionPanel;

	@Override
	protected void initNovelFacesPage() {
		accordionPanel = new AccordionPanel(NFBy.mainFormId("accordion"));
		Example1TabContent example1TabContent = new Example1TabContent();
		Example2TabContent example2TabContent = new Example2TabContent();
		Example3TabContent example3TabContent = new Example3TabContent();
		Example4TabContent example4TabContent = new Example4TabContent();
		Example5TabContent example5TabContent = new Example5TabContent();
		accordionPanel.addTab(new Tab<Example1TabContent>(NFBy
				.mainFormId(EXAMPLE1), example1TabContent));
		accordionPanel.addTab(new Tab<Example2TabContent>(NFBy
				.mainFormId(EXAMPLE2), example2TabContent));
		accordionPanel.addTab(new Tab<Example3TabContent>(NFBy
				.mainFormId(EXAMPLE3), example3TabContent));
		accordionPanel.addTab(new Tab<Example4TabContent>(NFBy
				.mainFormId(EXAMPLE4), example4TabContent));
		accordionPanel.addTab(new Tab<Example5TabContent>(NFBy
				.mainFormId(EXAMPLE5), example5TabContent));
	}

	@Override
	protected String getContentHeaderTitle() {
		return "Component - "
				+ getProperty("numpad_dec_separator");
	}

	public AccordionPanel getAccordionPanel() {
		return accordionPanel;
	}

	@Override
	protected NumpadDecSepPage getPageNavigation() {
		return getNavigation().gotoNumpadDecSepPage();
	}

}
